<template>
    <div class="tab1" v-for="(item, index) of projectList" :key="index">
        <div class="company" @click="jump({ path: '/ProjectDetail', query: { projectId: item.projectId } })">
            <div class="box">
                <div class="dv1">
                    <div class="name1">{{item.projectName}}</div>
                    <div class="name2">投资总额</div>
                </div>
                <div class="dv2">
                    <div class="name2">投资方向：{{item.investmentDirection}}</div>
                    <div class="name3">{{item.projectAmount}}<span class="danwei">万元</span></div>
                </div>
                <div class="dv3">
                    <div class="name2">负责人：{{item.talent_person_info.name}}</div>
                    <!-- <div class="name2">{{item.time}}</div> -->
                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
import { ref, watch, toRefs, onMounted } from 'vue';
import { getProjectList } from '@/api/company.js';
import { useRouter } from 'vue-router';
const router = new useRouter();

const projectList = ref([])
const getProject = async () => {
  const { code, data } = await getProjectList({
    currentPage: 1,
    pageSize: 20,
  });
  if (code === 200) {
    projectList.value = data.list;
  }
}
const jump = (options) => {
  router.push(options);
}

// const props = defineProps({
//     talentDataList: { type: Object, default: () => ([]) }
// })

// const emit = defineEmits([ 'jump' ]);
//   //  点击跳转
//   const jump = () => {
//     emit('jump');
//   }
onMounted(() => {
    getProject()
})

</script>

<style lang="scss" scoped>
.tab1{
    padding: 1.2rem;
    background: #fff;
    display: flex;
    align-items: flex-start;
    justify-content:flex-start;
    margin: 1.2rem;
}
.company{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}
.box{
    width: 100%;
}
.dv1,.dv2,.dv3{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-right: 1rem;

    .name1{
        font-size: 1.8rem;
        font-weight: 700;
    }
    .name2{
        font-size: 1.4rem;
        font-weight: 400;
    }
    .name3{
        font-size: 2.4rem;
        font-weight: 700;
        color: #FF8D1A;

        .danwei{
            font-size: 1.4rem;

        }
    }
}
.dv2{
    border-bottom: 1px solid #F2F2F4;
    padding-bottom: 1.1rem;
    margin: 0.4rem 0 0.6rem;
}





</style>